home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
dev
/
lang
/
amigatalk.lha
/
intuition
/
BoopsiColorWheelTags.st
< prev
next >
Wrap
Text File
|
2002-05-05
|
2KB
|
55 lines
" -------------------------------------------------------------------- "
" BoopsiColorWheelTags Class is a Singleton class that allows the user "
" to reference BOOPSI ColorWheel class tags' hexadecimal values. "
""
" EXAMPLE: 'myTag <- colorWheelTags getTag: #WHEEL_Hue' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" -------------------------------------------------------------------- "
Class BoopsiColorWheelTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
getTag: tagKey
^ self at: tagKey
|
privateInitializeDictionary
self at: #WHEEL_Hue put: 16r84000001. " set/get Hue "
self at: #WHEEL_Saturation put: 16r84000002. " set/get Saturation "
self at: #WHEEL_Brightness put: 16r84000003. " set/get Brightness "
self at: #WHEEL_HSB put: 16r84000004. " set/get ColorWheelHSB "
self at: #WHEEL_Red put: 16r84000005. " set/get Red "
self at: #WHEEL_Green put: 16r84000006. " set/get Green "
self at: #WHEEL_Blue put: 16r84000007. " set/get Blue "
self at: #WHEEL_RGB put: 16r84000008. " set/get ColorWheelRGB "
self at: #WHEEL_Screen put: 16r84000009. " init screen/enviroment "
self at: #WHEEL_Abbrv put: 16r8400000A. " 'GCBMRY' if English "
self at: #WHEEL_Donation put: 16r8400000B. " colors donated by app "
self at: #WHEEL_BevelBox put: 16r8400000C. " inside a bevel box "
self at: #WHEEL_GradientSlider put: 16r8400000D. " attached gradient slider "
self at: #WHEEL_MaxPens put: 16r8400000E. " max # of pens to allocate "
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self privateInitializeDictionary.
].
^ self "or ^ uniqueInstance??"
]